<?php

namespace app\index\controller;

use app\common\controller\Frontend;
use think\Db;
use think\Response;
use fast\Payment as PaymentFast;
/**
 * Ajax异步请求
 * @internal
 */
class Payment extends Frontend
{

    public function alipay(){

    }

    public function wechat(){

    }

    public function return(){
        if($this->request->isPost()){
            $out_trade_no = $this->request->post('out_trade_no');
            $result = PaymentFast::query($out_trade_no);
            if($result){
                $this->success('支付成功');
            }else{
                $this->error('支付失败');
            }
        }
    }
}